﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Find.aspx.cs" Inherits="HFWebApp.Find" %>

<%@ Register src="Control/end.ascx" tagname="end" tagprefix="uc1" %>
<%@ Register src="Control/top.ascx" tagname="top" tagprefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<title>红法网</title>
<link href="Style/Style.css" rel="stylesheet" type="text/css" />
    <link href="CSS.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="Scripts/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="Scripts/WebFunction.js"></script>
    <script type="text/javascript" src="javascript/SwitchTags.js"></script>
    <script type="text/javascript">
        function FindPassword() {
            var uid = $("#uid");
            if (uid.val() == "") {
                alert("请填写你的用户帐号/邮箱");
                return false;
            }
            var findtype = $('input:radio[name=findtype]:checked').val();
            if (findtype == "1") {
                var chkEmail = new RegExp(/\w@\w*\.\w/);
                if (!chkEmail.exec(uid.val())) {
                    alert("Email格式不正确");
                    uid.focus();
                    return false;
                }
            }
            $.getJSON(
                "/AjaxSource/FindPassword.ashx",
                {
                    uid: uid.val(),
                    typeid: findtype,
                    rand: Math.floor(Math.random() * 10000).toString()
                },
                function (jsonData) {
                    alert(jsonData.Message);
                }
            );
            return false;   
        }
    </script>
</head>

<body>
<uc2:top ID="top1" runat="server" />
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0" class="bk_h">
  <tr>
    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:10px">
      <tr>
        <td height="30" background="images/bt_bj_3.jpg"><table width="130" border="0" cellspacing="0" cellpadding="0" style="margin-left:5px">
          <tr>
            <td height="28" align="center" background="images/bt_bj_23.jpg" class="bt_b_c" style="padding-top:2px">找回密码</td>
          </tr>
        </table></td>
      </tr>
    </table>
      <table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td class="h_12">请填写您的用户名或注册邮箱，点击确认提交，我们会发一封邮件到您的邮箱，在邮件中包含您的新的密码</td>
        </tr>
      </table>
      <table width="900" border="0" align="center" cellpadding="0" cellspacing="1" style="margin-bottom:12px">
      <form id="findForm" onsubmit="return FindPassword();">
        <tr>
          <td width="120" height="32" align="right" bgcolor="#E8ECEB">用户名或邮箱：</td>
          <td bgcolor="#E8ECEB" style="padding-left:12px"><input type="text" name="uid" id="uid" />
          *</td>
        </tr>
        <tr>
          <td height="32" align="right" bgcolor="#E8ECEB"><strong>类型：</strong></td>
          <td bgcolor="#E8ECEB" style="padding-left:12px"><input type="radio" checked="checked" name="findtype" id="findtype" value="0" />
用户名
  <input type="radio" name="findtype" id="findtype" value="1" />
邮箱          
          *</td>
        </tr>
        <tr>
          <td height="32" align="right" bgcolor="#E8ECEB">&nbsp;</td>
          <td bgcolor="#E8ECEB" style="padding-left:12px; padding-bottom:8px; padding-top:8px"><input id="Button1" type="image" src="images/an_tj_3.jpg"/></td>
        </tr>
        </form>
    </table>
      <table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td class="h_12">友情提示： 请妥善保管！如果还未能解决，请联系在线客服 </td>
        </tr>
    </table></td>
  </tr>
</table>
<uc1:end ID="end1" runat="server" />
</body>
</html>
